
#include <iostream>
#include <string>
using namespace std;

int main()
{
	int n;
	cin>>n;
	char c;
	cin>>noskipws>>c;
	string s;
	getline(cin,s);
	int size = s.size();
	string *ss = new string[n];
	for( int i=0; i<size; i++ ){
		ss[i%n].push_back(s[i]);
	}
	int	sz = ss[0].size();
	for(int i=0; i<n; i++){
		if(ss[i].size()<sz){
			ss[i].push_back(' ');
		}
		for(int j=sz-1; j>=0; j--){
			cout<<ss[i][j];
		}
		cout<<endl;
	}

	return 0;
}
